//
//  UIViewController+GetBundle.m
//  AFNetworking
//
//  Created by 刘琛 on 2019/3/28.
//

#import "UIViewController+GetBundle.h"

@implementation UIViewController (GetBundle)


- (NSBundle *)getBundle {
    return [NSBundle bundleWithURL:[[NSBundle bundleForClass:[self class]] URLForResource:@"NewMarketLib" withExtension:@"bundle"]];
}

- (UIImage *)getImageFromBundle:(NSString *)imageName {
    return [UIImage imageNamed:imageName inBundle:[self getBundle] compatibleWithTraitCollection:nil];
}

- (UINib *)getNibFromBundle:(NSString *)nibName {
    return [UINib nibWithNibName:nibName bundle:[self getBundle]];
}

@end
